import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'


Vue.config.productionTip = false

import { Button,Cell,CellGroup } from 'vant';
import { NavBar } from 'vant';
import { Tabbar, TabbarItem ,Toast} from 'vant';

Vue.use(Button);   //全局挂载的方案
Vue.use(Cell);   
Vue.use(CellGroup);   
Vue.use( NavBar );  
Vue.use( Tabbar, );  
Vue.use( TabbarItem );  
Vue.use(Toast)


import axios from './utils/request.js'
Vue.prototype.$http = axios;

Vue.mixin({
  data(){
    return{
      baseColor:'#07c160'
    }
  }
})

let token = localStorage.getItem('token')

if(!token){

}else{
  store.dispatch('getUserInfo',token)
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
